/*
 * 连接一个 MongoDB 数据库，作简单操作
 */
const express = require('express')
const route = express.Router()
const path = require('path')
const fs = require('fs')
const createDB = require('./database')

route.get('/', (req, res) => {
    createDB()
    res.send('已连接数据库，自动插入 3 条数据')
})

module.exports = {
    path: '/database',
    route
}